From 250f988c6c41004bd46990edb9d5662bb606cf92 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 10 Sep 2015 12:18:03 +0100 Subject: [PATCH] configure: don't silently disable systemd support Originally when user runs ./configure --enable-systemd and systemd development library is not available the build system silently disables systemd support. This is not in line with normal expectation. Instead, configure should error out when user has asked for systemd support but development libraries can't be found. Reported-by: George Dunlap Signed-off-by: Wei Liu Acked-by: Ian Campbell --- m4/systemd.m4 | 6 +++++- tools/configure | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 8284993223..e4b1aa5800 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -85,7 +85,11 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ AC_DEFINE([HAVE_SYSTEMD], [1], [Systemd available and enabled]) systemd=y AX_CHECK_SYSTEMD_LIBS() - ],[systemd=n]) + ],[ + AS_IF([test "x$enable_systemd" = "xyes"], + [AC_MSG_ERROR([Unable to find systemd development library])], + [systemd=n]) + ]) ],[systemd=n]) ]) diff --git a/tools/configure b/tools/configure index 99677d1634..41bed7712a 100755 --- a/tools/configure +++ b/tools/configure @@ -9317,10 +9317,16 @@ fi fi +else + + if test "x$enable_systemd" = "xyes"; then : + as_fn_error $? "Unable to find systemd development library" "$LINENO" 5 else systemd=n fi +fi + else systemd=n fi -- 2.30.2